@extends('home/mainlayout')
@section('content')
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script src="/Admin/js/jquery-1.8.3.min.js"></script>
<link rel="stylesheet" href="/Admin/layer/skin/default/layer.css">
<script src="/Admin/layer/layer.js"></script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改密码</title>
    <link href="css/intable.css" rel="stylesheet" type="text/css"  />
    <script language="javascript">
        function CheckForm()
        {
            var str=document.getElementsByName("radType");
            if(str[0].checked == true)
            {
                if (document.form1.txtpassword.value=="")
                {
                    layer.msg('请输入原密码',{
                        time:2000  //2毫秒
                    });
                    document.form1.txtpassword.focus();
                    return false;

                }
            }
            if(document.form1.txtNewpassword.value =="")
            {
                layer.msg('请输入新密码',{
                    time:2000  //2毫秒
                });
                document.form1.txtNewpassword.focus();
                return false;
            }
            if(document.form1.txtNewpassword.value.length <6)
            {
                layer.msg('新密码长度应在６－１６位！',{
                    time:2000  //2毫秒
                });
                document.form1.txtNewpassword.focus();
                return false;
            }

            if (document.form1.txtNewpassword2.value=="")
            {
                layer.msg('请输入您的确认密码！',{
                    time:2000  //2毫秒
                });
                document.form1.txtNewpassword2.focus();
                return false;
            }
//            if (form1.txtNewpassword.value != form1.txtNewpassword2.value)
//            {
//                document.form1.txtNewpassword2.focus();
//                newpwright.innerHTML = "<font color=red><b>×</b>新密码与确认密码不匹配!</font>";
//                return false;
//            }

        }

    </script>
    <script type="text/javascript">
        var msg = "{{Session::get('message')}}";
        //触发事件
        $(window).ready(function(){
            if(msg){
                layer.msg(msg,{
                    time:2000  //2毫秒
                });
            }
        });
    </script>
</head>
<body>
<br />
<div id="biaoti">修改密码</div>
<table class="hongtable">
    <caption>*修改密码*</caption>
    <form name="form1" id="form1" method="post" action="dopass" onsubmit="{return CheckForm();}">
        {{csrf_field()}}
        <tr>
            <th colspan="2"><label for="dlmm" >登录密码</label><input name="radType" id="dlmm" type="radio" value="1" checked>
                &nbsp;
                <label for="zfmm" type="2">交易密码</label><input name="radType" id="zfmm" type="radio" value="2">
            </th>
        </tr>
        <tr>
            <th align="right" width="40%"><font color="red">*</font> 原密码：</th>
            <th align="left">　<input name="txtpassword" type="password" class="bb" id="txtpassword" size="20" maxlength="16"></th>
        </tr>
        <tr>
            <th align="right"><font color="red">*</font> 新密码：</th>
            <th align="left">　<input name="txtNewpassword" type="password" class="bb" id="txtNewpassword" size="20" maxlength="16"></th>
        </tr>
        <tr>
            <th align="right"><font color="red">*</font> 确认新密码：</th>
            <th align="left">　<input name="txtNewpassword2" type="password" class="bb" id="txtNewpassword2" size="20" maxlength="16"><span id="newpwright"></span></th>
        </tr>
        <tr>
            <th colspan="2">
                <input name="submit" type="submit" class="white" style="width:120px; height:30px" value="提 交">
                <input name="submit2" type="reset" class="white" style="width:120px; height:30px" value="重 置"></th>
        </tr>
    </form>
</table>
</body>
</html>
@endsection
